<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>固定定位</title>
<!--    *代表所有的页面标签-->
    <style>
        *{
            margin: 0;
            padding: 0;
        }
      #top{
        text-align: center;
        background-color: rgba(0,0,120,0.5);
        position: fixed;
        padding: 10px 0;
        width: 100%;
        height: 12px;
      }
      .title{
          position: absolute;
          top:32px
      }

    </style>
</head>
<body>
<div>
  <div id="top">web 功能设计很强大</div>
    <div class="title">我是个标题栏</div>
  <div style="height: 2000px"></div>
</div>

</body>
</html>